﻿#ifndef HOTELMANAGE_H
#define HOTELMANAGE_H

#include <QWidget>
#include "hotelmanagecontent.h"
#include "registerhotel.h"
#include "housemanage.h"

namespace Ui {
class HotelManage;
}

class HotelManage : public QWidget
{
    Q_OBJECT
signals:
    void signalGainHotelDetails(const QString &);
    void signalGainHotelTypeInfo();
    void signalGainHouseTypeInfo(const QString &,const QString &);
    void signalDeleteHotelInfo(const QString &);
    void signalDeleteHouseInfo(const QString &);
    void signalSubmitHouseInfo();
    void signalSubmitHotelInfo();

public:
    explicit HotelManage(QWidget *parent = nullptr);
    ~HotelManage();

public slots:
    void slotHotelManageListClean();
    void slotSetHotelInfosList(bool result, const QString &msg);
    void slotSetHotelInfosImage(bool result, const QString&hotelID, const QImage&image);

    void slotGainHouseList(const QString& index, const QString &hotelID);
    void slotSetHotelDetails();
    void slotDeleteHotelInfoResult();
    void slotHotelImage();
    void slotSetHouseList(bool result,QString msg);

    void slotSaveHouseImage(const QString&,const QImage&);
    void slotSubmitHouseResult(bool result, const QString &msg);
    void slotDeleteHouseResult(bool result, const QString &msg);
    void slotSubmitHotelResult(bool result, const QString &msg);
    void slotDeleteHotelResult(bool result, const QString &msg);

private slots:
    void on_pb_addHotel_clicked();

private:
    Ui::HotelManage *ui;

    int m_contentCount[2];
    RegisterHotel *m_registerHotel;
    HouseManage *m_houseManage;
    QVector<HotelManageContent *> m_hotelVector[2];
};

#endif // HOTELMANAGE_H
